//
//  MLABaseTableCell.m
//  MagicLampApp
//
//  Created by Zheng on 2018/12/19.
//  Copyright © 2018 zheng.magic.lamp.app. All rights reserved.
//

#import "MLABaseTableCell.h"

@implementation MLABaseTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style
              reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CGRect rect = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
        UIGraphicsBeginImageContext(rect.size);
        CGContextRef context = UIGraphicsGetCurrentContext();
        UIColor *selectedColor = CX_GetColorHex(0xF1F2F9, 1);
        CGContextSetFillColorWithColor(context, [selectedColor CGColor]);
        CGContextFillRect(context, rect);
        UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        self.selectedBackgroundView = [[UIImageView alloc] initWithImage:image];
    }
    return self;
}

@end
